<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:pe="http://primefaces.org/ui/extensions"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets">
    <h:head>
        <title>#{bundle.cuscor}</title>
        <link href="./resources/css/default.css" rel="stylesheet" type="text/css" /> 
    </h:head>
    
    <h:body>
        <ui:composition>
            <h:panelGrid styleClass="addELIT" cellpadding="0" border="0" >
                 <h:panelGrid columns="2" cellpadding="0" border="0" columnClasses="panelGridId,panelGridId">
                    <h:form>
                        <p:outputPanel autoUpdate="true">
                            <p:dataTable id="dtOttor" value="#{approvalBean.approvals}" var="app"  
                                        selection="#{approvalBean.approval}" selectionMode="single" rowKey="#{app.id}">
                                <p:ajax event="rowSelect" listener="#{approvalBean.onRowSelected}" />
                                <p:column width="190">
                                    <f:facet name="header" >Otorisasi</f:facet>
                                    <h:outputText value="#{app.appName} (#{app.count})" />
                                </p:column>
                            </p:dataTable>
                        </p:outputPanel>    
                    </h:form> 
                     
                    <p:outputPanel autoUpdate="#{approvalBean.updateTab}">
                        <p:panel header="#{approvalBean.approval.appName}" id="panelOttor" >
                            <ui:include src="#{approvalBean.approval.url}" />
                        </p:panel>
                    </p:outputPanel>    
                </h:panelGrid>   
            </h:panelGrid>
        </ui:composition>
    </h:body>
</html>

